package com.heima.client.wemedia;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.pojos.wemedia.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-wemedia")
public interface IWemediaClient {

    @PostMapping("/api/v1/wmuser")
    public ResponseResult createWmUser(@RequestBody WmUser user);

    //根据id获取wm_user表信息
    @PostMapping("/api/v1/wmuser/{id}")
    public WmUser getWmUserById(@PathVariable("id") Long id);

    /**
     * 获取所有频道
     * @return
     */
    @GetMapping("/api/v1/channel/channels")
    public ResponseResult channels();
}
